# Set the base image to the official Ray image
FROM rayproject/ray:2.8.1

# Install dependencies
RUN sudo apt update \
        && sudo apt install ffmpeg libsm6 libxext6 -y \
        && python3 -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple \
        && python3 -m pip install --upgrade pip \
        && python3 -m pip install --timeout=120 \
                git+https://gitee.com/Morphlng/uav_3d_env.git \
                git+https://gitee.com/Morphlng/rl_evolve.git \
                torch \
                torchvision \
                torchaudio \
                tensordict \
                tensorboard \
                tensorboardX \
                tensorflow_probability \
                onnx \
                onnxruntime \
                pettingzoo \
                supersuit \
                tabulate \
                "numpy<2.0" \
                pandas \
                matplotlib \
                orjson \
                "setuptools<70.0.0"

# Set the working directory
WORKDIR /workspace

# Expose ports for the Dashboard, Redis, TensorBoard, and Tune
EXPOSE 6006 6379 8265 10001